import { requestClient } from '#/api/request';

export function AddObj(form: any) {
  return requestClient.post(`/iam/product/subscriptions`, form);
}

export function DelObj(id: string) {
  return requestClient.delete(`/iam/product/subscriptions/${id}`);
}

export function UpdateObj(form: any) {
  return requestClient.put(`/iam/product/subscriptions/${form.id}`, form);
}

export function GetPage(query: any) {
  return requestClient.post(`/iam/product/subscriptions/page`, {
    page: { current: query.current, size: query.size },
    model: {
      productId: query?.productId,
      tenantId: query?.tenantId,
      status: query?.status,
    },
  });
}

export function TenantList(tenantIds: any) {
  return requestClient.post('/iam/tenant/setting/ids', tenantIds);
}